<?php

namespace common\models\c2\query;

use kzo\base\models\statics\EntityModelStatus;

/**
 * This is the ActiveQuery class for [[\common\models\c2\entity\Attribute]].
 *
 * @see \common\models\c2\entity\Attribute
 */
class AttributeQuery extends \yii\db\ActiveQuery
{
    public function active()
    {
        // return $this->andWhere('[[status]]=1');
        return $this->andWhere(['status' => EntityModelStatus::STATUS_ACTIVE]);
    }

    /**
     * @inheritdoc
     * @return \common\models\c2\entity\Attribute[]|array
     */
    public function all($db = null)
    {
        return parent::all($db);
    }

    /**
     * @inheritdoc
     * @return \common\models\c2\entity\Attribute|array|null
     */
    public function one($db = null)
    {
        return parent::one($db);
    }
}
